<!DOCTYPE html>
<html>
<head>
	<title>Edit item</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<link rel="stylesheet" type="text/css" href="../common/demo_style.css"/>
	<style>
		.dhx_item_editor {
			width:170px;
			height:70px;
		}
	</style>
	<script>
		var myList;
		function doOnLoad() {
			myList = new dhtmlXList({
				container:"data_container",
				edit:true,
				type:{
					template:"<span class='dhx_strong'>#name#</span>#address# <br/><span class='dhx_light'>#city#</span>",
					template_edit:"<textarea class='dhx_item_editor' bind='obj.name'>",
					height: 80
				}
			});
			myList.attachEvent("oneditkeypress",function(code){
				if (code == 13)
					this.stopEdit();
				else if (code == 27)
					this.stopEdit(true);

			});
			myList.load("../common/list.xml")
		}
	</script>
</head>
<body onload="doOnLoad();">
	<h1>Editing item</h1>
	<p>Double click item to edit it</p>
	<div id="data_container" class="list_demo_samples"></div>
</body>
</html>
